package service;

import dao.UserDao;
import dao.UserDaoImpl;
import pojo.User;

import java.sql.SQLException;

public class UserServiceImpl implements UserService{
    private UserDao userDao = new UserDaoImpl();
    //根据用户名查询用户对象
    public User selectByUsername(String username) throws SQLException{
        return userDao.selectByUsername(username);
    }
    //注册用户
    public int addUser(User user){
        return userDao.addUser(user);
    }
}
